import Vue from 'vue'
import VueRouter from 'vue-router'

const Home=()=>import('../views/Home')
const Comment=()=>import('../views/Comment')
const editor=()=>import('../views/editor')
const Tiezi=()=>import('../views/Tiezi')
const Detail=()=>import('../views/Detail')

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Home
  },{
        path: '/comment',
        component: Comment
    },{
        path: '/editor',
        component: editor
    },{
        path: '/tiezi',
        component: Tiezi
        // children:[{
        //     path:"detail",
        //     component:Detail
        // }]
    },
    {
        path: '/tiezi/detail',
        component: Detail
        // children:[{
        //     path:"detail",
        //     component:Detail
        // }]
    }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
